package com.mbc.common.utils;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class CSVUtil {
	public static List<String[]> readFile(String csvFile, String seperatedBy)throws FileNotFoundException, IOException{
		BufferedReader l_br = null;
		String l_line = "";
		l_br = new BufferedReader(new FileReader(csvFile));
		List<String[]> l_lines = new ArrayList<String[]>();
		while((l_line = l_br.readLine()) != null){
			String[] l_newLine = l_line.split(seperatedBy);
			l_lines.add(l_newLine);
		}
		l_br.close();
		return l_lines;
	}
}
